home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr54 / bison118.zip / MAKEFILE.IN < prev    next >
Text File  |  1993-06-01  |  5KB  |  154 lines

  1. # Makefile for bison
  2. # Copyright (C) 1984, 1989, 1991 Bob Corbett and Free Software Foundation, Inc.
  3. # This file is part of Bison, the GNU Compiler Compiler.
  4. # Bison is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. # Bison is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with Bison; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. SHELL = /bin/sh
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. @VPATH@
  22.  
  23. CC = @CC@
  24. INSTALL = @INSTALL@
  25. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  26. INSTALL_DATA = @INSTALL_DATA@
  27.  
  28. # Things you might add to DEFS:
  29. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  30. # -DUSG            If you have System V/ANSI C string and
  31. #            memory functions and headers.
  32. DEFS = @DEFS@
  33.  
  34. CDEBUG = -g
  35. CFLAGS = $(CDEBUG) $(DEFS)
  36. LDFLAGS = -g
  37.  
  38. LIBS = @LIBS@
  39.  
  40. # Some System V machines do not come with libPW.  If this is true, use
  41. # the GNU alloca.o here.
  42. ALLOCA = @ALLOCA@
  43.  
  44. prefix = /usr/local
  45. exec_prefix = $(prefix)
  46.  
  47. # where the installed binary goes
  48. bindir = $(exec_prefix)/bin
  49.  
  50. # where the parsers go
  51. datadir = $(prefix)/lib
  52.  
  53. # where the info files go
  54. infodir = $(prefix)/info
  55.  
  56. # where manual pages go and what their extensions should be
  57. mandir = $(prefix)/man/man$(manext)
  58. manext = 1
  59.  
  60. #### End of system configuration section. ####
  61.  
  62. # names of parser files
  63. PFILE = bison.simple
  64. PFILE1 = bison.hairy
  65.  
  66. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  67.      -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  68.  
  69. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  70.       getargs.o gram.o lalr.o lex.o                    \
  71.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  72.       warshall.o version.o                        \
  73.       getopt.o getopt1.o $(ALLOCA)
  74.  
  75. all: bison bison.info
  76.  
  77. clean:
  78.     rm -f *.o core bison
  79.  
  80. mostlyclean: clean
  81.  
  82. distclean: clean
  83.     rm -f Makefile config.status
  84.  
  85. realclean: distclean
  86.     rm -f TAGS *.info*
  87.  
  88. # Most of these deps are in case using RCS.
  89. install: all mergedir.awk bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1)
  90.     $(INSTALL_PROGRAM) bison $(bindir)
  91.     -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  92. # Copy bison.simple, inserting directory name into the #line commands.
  93.     awk -f $(srcdir)/mergedir.awk dir=$(datadir) $(srcdir)/$(PFILE) > $(datadir)/$(PFILE)
  94.     $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)
  95.     chmod a+r $(datadir)/$(PFILE) $(datadir)/$(PFILE1) 
  96.     $(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  97.     chmod a+r $(mandir)/bison.$(manext)
  98.     for file in $(srcdir)/bison.info*; \
  99.     do $(INSTALL_DATA) $$file $(infodir); \
  100.     done
  101.  
  102. bison: $(OBJECTS)
  103.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
  104.  
  105. dist:
  106.     echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  107.     -rm -rf `cat .fname`
  108.     mkdir `cat .fname`
  109.     ln  COPYING ChangeLog Makefile.in configure configure.in \
  110.         REFERENCES bison.1 \
  111.         bison.simple bison.hairy mergedir.awk \
  112.         LR0.c allocate.c closure.c conflicts.c derives.c \
  113.         files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  114.         output.c print.c reader.c reduce.c symtab.c version.c \
  115.         warshall.c files.h gram.h lex.h machine.h new.h state.h \
  116.         symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  117.         vmshlp.mar README INSTALL bison.texinfo bison.info* texinfo.tex \
  118.       `cat .fname`
  119.     cp -p getopt.[ch] getopt1.c alloca.c `cat .fname`
  120.     tar chZf `cat .fname`.tar.Z `cat .fname`
  121.     -rm -rf `cat .fname` .fname
  122. .PHONY: dist
  123.  
  124. bison.info: bison.texinfo
  125.     makeinfo $bison.texinfo<
  126.  
  127. TAGS: *.c *.h
  128.     etags *.c *.h
  129.  
  130. # This file is different to pass the parser file names to the compiler.
  131. files.o: files.c
  132.     $(CC) -c $(CFLAGS) $(PFILES) $files.c< $(OUTPUT_OPTION)
  133.  
  134. LR0.o: system.h machine.h new.h gram.h state.h
  135. closure.o: system.h machine.h new.h gram.h
  136. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  137. derives.o: system.h new.h types.h gram.h
  138. files.o: system.h files.h new.h gram.h
  139. getargs.o: system.h files.h
  140. lalr.o: system.h machine.h types.h state.h new.h gram.h
  141. lex.o: system.h files.h symtab.h lex.h
  142. main.o: system.h machine.h
  143. nullable.o: system.h types.h gram.h new.h
  144. output.o: system.h machine.h new.h files.h gram.h state.h
  145. print.o: system.h machine.h new.h files.h gram.h state.h
  146. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  147. reduce.o: system.h machine.h files.h new.h gram.h
  148. symtab.o: system.h new.h symtab.h gram.h
  149. warshall.o: system.h machine.h
  150.